package com.example.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyController {
    @RequestMapping({"/","/index"})
    public String toIndex(Model model){
        model.addAttribute("msg","hello,shiro");
        return "index";
    }

    @RequestMapping("/user/addUser")
    public String to_addUser(){
        return "user/addUser";
    }

    @RequestMapping("/user/updataUser")
    public String to_updataUser(){
        return "user/updataUser";
    }

    @RequestMapping("/to_login")
    public String to_login(){
        return "login";
    }

    @RequestMapping("/Unauthorized")
    public String Unauthorized(){
        return "Unauthorized";
    }
}
